const express =require("express")
const cors = require("cors")
const app = express()
app.use(express.urlencoded({extended:false}))
// app.use(express.json())
app.use(cors())
app.get("/test",(req,res)=>{
    res.send(req.query)
})
app.post("/test",(req,res)=>{
    res.send(req.body)
})
app.listen(5000,(err)=>{
    if(err) console.log("fail")
    else console.log("ok")
})